Dynamic Host Configuration Protocol.html
* created: 2026-05-10T23:34
* modified: 2026-05-10T23:58
title
Title
description
Description
Dynamic Host Configuration Protocol (DHCP)
This protocol dynamically configures IP address lol. You still can configure subnet masks, DNS servers, and default routers manually, but for most usecase you would prefer obtaining them automagically via DHCP.
DHCP allows the server to designate specific address ranges for dynamic allocation, e.g., assigning IP addresses from the 192.168.2.0/24 subnet. Such a range is known as a DHCP address pool.
Dynamic DHCP address allocation follows four steps, using UDP port 67 for client requests and port 68 for server responses, which are linked via a transaction ID in the DHCP data:
- Discover: The client broadcasts a server search. Since the network mask is still unknown, the destination IP is all ones and the source is all zeros.
- Offer: A server responds with an IP address and its lease duration.
- Request: The client accepts the offered address, still using broadcast (as in the Discover step).
- Ack: The server confirms the client may now use the address.